home *** CD-ROM | disk | FTP | other *** search
- global gSoundLevel
-
- on mouseWithin me
- cursor(260)
- end
-
- on mouseLeave me
- cursor(0)
- end
-
- on mouseDown me
- cursor(290)
- set topH to 535
- set topV to 360
- set bottomH to 549
- set bottomV to 445
- set startV to the mouseV
- set thisWidth to the width of sprite the currentSpriteNum / 2
- repeat while the mouseDown
- if startV > the mouseV then
- set newV to the mouseV
- if newV < topV then
- set newV to topV
- end if
- set y1 to float(bottomV - newV) / float(bottomV - topV)
- set y2 to topH - integer(float(bottomH - topH) * y1)
- set the locV of sprite the currentSpriteNum to newV
- set the locH of sprite the currentSpriteNum to y2 + thisWidth
- set gSoundLevel to integer(y1 * 255)
- set the volume of sprite 24 to gSoundLevel
- end if
- if startV < the mouseV then
- set newV to the mouseV
- if newV > bottomV then
- set newV to bottomV
- end if
- set y1 to float(bottomV - newV) / float(bottomV - topV)
- set y2 to topH - integer(float(bottomH - topH) * y1)
- set the locV of sprite the currentSpriteNum to newV
- set the locH of sprite the currentSpriteNum to y2 + thisWidth
- set gSoundLevel to integer(y1 * 255)
- set the volume of sprite 24 to gSoundLevel
- end if
- updateStage()
- end repeat
- end
-
- on mouseUp me
- cursor(260)
- end
-